public class Queue<E extends Comparable<? super E>> {
    private Heap heap;

    public Queue() {
      heap = new Heap(128);
    }

    public void enqueue(int key, E element ) {
      heap.insert(key, element);
    }

    public HeapNode<E> dequeue() {
      return ( heap.remove() );
    }

    public boolean isEmpty() {
        return ( heap.isEmpty() );
    }

    public int size() {
      return ( heap.size() );
    }
}